package com.xuelang.pipeline.artifact.infrastructure.resource.converter;

import com.xuelang.pipeline.artifact.domain.resource.RepositoryComponent;
import com.xuelang.pipeline.artifact.infrastructure.resource.dataobject.RepositoryComponentDO;
import org.mapstruct.Mapper;
import org.mapstruct.factory.Mappers;

/**
 * 制品仓库-组件实体与制品仓库-组件DO转换器类
 *
 * @author xiwen.zxg
 * @since 2024/5/15
 */
@Mapper
public interface RepositoryComponentToRepositoryComponentDOConverter {

    RepositoryComponentToRepositoryComponentDOConverter INSTANCE = Mappers.getMapper(RepositoryComponentToRepositoryComponentDOConverter.class);

    /**
     * RepositoryComponent转化为RepositoryComponentDO
     * @param repositoryComponent
     * @return
     */
    RepositoryComponentDO repositoryComponentToRepositoryComponentDO(RepositoryComponent repositoryComponent);

    /**
     * RepositoryComponentDO转化为RepositoryComponent
     * @param repositoryComponentDO
     * @return
     */
    RepositoryComponent repositoryComponentDOToRepositoryComponent(RepositoryComponentDO repositoryComponentDO);

}
